package com.biovr.backend.repository;

import com.biovr.backend.domain.Apparatus;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by dell on 2016/12/23.
 */
@Repository
public interface ApparatusRepository extends MongoRepository<Apparatus, String> {
    /**
     * faind all actived
     * @param status
     * @return
     */
    List<Apparatus> findByStatus(@Param("Status") boolean status);
    /**
     * 根据名称查找
     * @param name
     * @return
     */
    List<Apparatus> findByName(String name);
    /**
     * 根据工程标准编号查找
     * @param stdCode
     * @return
     */
    Apparatus findByStdCode(String stdCode);
}
